package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.CursorIntent;
import com.yanmaohu.yulia.bean.ExtendedCursorName;

/**
 * @author Bright Lee
 */
public final class AllocateCursorStatement implements SqlDynamicDataStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private ExtendedCursorName extendedCursorName;
    private CursorIntent cursorIntent;

    public AllocateCursorStatement(int beginIndex,
                                   ExtendedCursorName extendedCursorName,
                                   CursorIntent cursorIntent) {
        this.beginIndex = beginIndex;
        this.endIndex = cursorIntent.getEndIndex();
        this.extendedCursorName = extendedCursorName;
        this.cursorIntent = cursorIntent;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public ExtendedCursorName getExtendedCursorName() {
        return extendedCursorName;
    }

    public CursorIntent getCursorIntent() {
        return cursorIntent;
    }

}
